<?php
namespace app\admin\controller;
/**
 * 友情链接控制器
 */
class Bloglist extends AdminBase
{
    
    /**
     * 友情链接列表
     */
    public function bloglistList()
    {
        
        $this->assign('list', $this->logicBloglist->getBloglistList());
        
        return $this->fetch('bloglist_list');
    }
    
    /**
     * 友情链接添加
     */
    public function bloglistAdd()
    {
        
        IS_POST && $this->jump($this->logicBloglist->bloglistEdit($this->param));
        
        return $this->fetch('bloglist_edit');
    }
    
    /**
     * 友情链接编辑
     */
    public function bloglistEdit()
    {
        
        IS_POST && $this->jump($this->logicBloglist->bloglistEdit($this->param));
        
        $info = $this->logicBloglist->getBloglistInfo(['id' => $this->param['id']]);
        
        $this->assign('info', $info);
        
        return $this->fetch('bloglist_edit');
    }
    
    /**
     * 友情链接删除
     */
    public function bloglistDel($id = 0)
    {
        
        $this->jump($this->logicBloglist->bloglistDel(['id' => $id]));
    }
}